3.379 \(\int \sec (c+d x) (a+b \sin (c+d x)) \, dx\)

Optimal. Leaf size=43 \[ \frac{(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac{(a+b) \log (1-\sin (c+d x))}{2 d} \]

[Out]

-((a + b)*Log[1 - Sin[c + d*x]])/(2*d) + ((a - b)*Log[1 + Sin[c + d*x]])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0400481, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {2668, 633, 31} \[ \frac{(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac{(a+b) \log (1-\sin (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

-((a + b)*Log[1 - Sin[c + d*x]])/(2*d) + ((a - b)*Log[1 + Sin[c + d*x]])/(2*d)

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \sec (c+d x) (a+b \sin (c+d x)) \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{a+x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac{(a+b) \log (1-\sin (c+d x))}{2 d}+\frac{(a-b) \log (1+\sin (c+d x))}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.0108662, size = 26, normalized size = 0.6 \[ \frac{a \tanh ^{-1}(\sin (c+d x))}{d}-\frac{b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/d - (b*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 34, normalized size = 0.8 \begin{align*} -{\frac{b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{a\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

-1/d*b*ln(cos(d*x+c))+1/d*a*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.950124, size = 47, normalized size = 1.09 \begin{align*} \frac{{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (a + b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*((a - b)*log(sin(d*x + c) + 1) - (a + b)*log(sin(d*x + c) - 1))/d

________________________________________________________________________________________

Fricas [A]  time = 2.29831, size = 97, normalized size = 2.26 \begin{align*} \frac{{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (a + b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((a - b)*log(sin(d*x + c) + 1) - (a + b)*log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (c + d x \right )}\right ) \sec{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

Integral((a + b*sin(c + d*x))*sec(c + d*x), x)

________________________________________________________________________________________

Giac [A]  time = 1.10903, size = 50, normalized size = 1.16 \begin{align*} \frac{{\left (a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) -{\left (a + b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*((a - b)*log(abs(sin(d*x + c) + 1)) - (a + b)*log(abs(sin(d*x + c) - 1)))/d